LOCAL_PATH := $(call my-dir)

ifneq ($(filter msm8974,$(TARGET_BOARD_PLATFORM)),)

# HAL module implemenation stored in
# hw/<POWERS_HARDWARE_MODULE_ID>.<ro.hardware>.so
include $(CLEAR_VARS)

LOCAL_SHARED_LIBRARIES := \
    liblog \
    libcutils \
    libdl

LOCAL_SRC_FILES := \
    power.c \
    metadata-parser.c \
    utils.c list.c \
    hint-data.c

LOCAL_SRC_FILES += \
    power-8974.c

ifeq ($(TARGET_USES_INTERACTION_BOOST),true)
    LOCAL_CFLAGS += -DINTERACTION_BOOST
endif

ifeq ($(TARGET_ENABLE_POWERHAL_LOGSPAM),true)
  LOCAL_CFLAGS += -DPOWERHAL_LOGSPAM
endif

ifneq ($(TARGET_TAP_TO_WAKE_NODE),)
  LOCAL_CFLAGS += -DTAP_TO_WAKE_NODE=\"$(TARGET_TAP_TO_WAKE_NODE)\"
endif

LOCAL_MODULE := power.$(TARGET_BOARD_PLATFORM)
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE_TAGS := optional

include $(BUILD_SHARED_LIBRARY)
endif
